﻿namespace HiMap.Carto.Render
{
    using HiMap.Base;
    using HiMap.Carto;
    using HiMap.Style;
    using System;

    public class FeatureLayerSimpleRenderClass : FeatureLayerRenderClass, IFeatureLayerSimpleRender, IFeatureLayerRender, IHiMapPtr
    {
        public FeatureLayerSimpleRenderClass()
        {
            base.m_InPtr = HiMap.Carto.VC.KWG_SIMPLERENDER_CREATE();
            base.m_Used = false;
        }

        internal FeatureLayerSimpleRenderClass(int InPtr, bool Used)
        {
            base.m_InPtr = InPtr;
            base.m_Used = Used;
        }

        IPointStyle IFeatureLayerSimpleRender.PointStyle
        {
            get
            {
                return new PointStyleClass(HiMap.Carto.VC.KWG_STYLE_GET_POINTSTYLE(HiMap.Carto.VC.KWG_SIMPLERENDER_GET_STYLE(base.m_InPtr)), true);
            }
            set
            {
                HiMap.Carto.VC.KWG_STYLE_SET_POINTSTYLE(HiMap.Carto.VC.KWG_SIMPLERENDER_GET_STYLE(base.m_InPtr), value.InPtr);
                value.Used = true;
            }
        }

        IPolygonStyle IFeatureLayerSimpleRender.PolygonStyle
        {
            get
            {
                return new PolygonStyleClass(HiMap.Carto.VC.KWG_SIMPLERENDER_GET_STYLE(base.m_InPtr), true);
            }
        }

        IPolylineStyle IFeatureLayerSimpleRender.PolylineStyle
        {
            get
            {
                return new PolylineStyleClass(HiMap.Carto.VC.KWG_STYLE_GET_LINESTYLE(HiMap.Carto.VC.KWG_SIMPLERENDER_GET_STYLE(base.m_InPtr)), true);
            }
            set
            {
                HiMap.Carto.VC.KWG_STYLE_SET_LINESTYLE(HiMap.Carto.VC.KWG_SIMPLERENDER_GET_STYLE(base.m_InPtr), value.InPtr);
                value.Used = true;
            }
        }
    }
}

